#!/usr/bin/env python

import sqlite3

db_file = "gallery.db"

def create_table():
    conn = sqlite3.connect(db_file)
    c = conn.cursor()
    c.execute("create table gallery (id text, comment text)")
    conn.commit()
    c.close()

def insert_photo(cur, id, comment):
    line = None
    while line != "":
	line = raw_input("insert id and comment: ")
	id, comment = line.split(" ", 1)
	print "inserting id:", repr(id), "comment:", repr(comment)
	cur.execute("insert into gallery values (%s, %s)"%(id, comment))

def insert_values(cur, values):
    cur.execute("insert into gallery values %s"%values)


